namespace Admin2025.Domain.Events;

// 用户创建事件
public class UserCreatedEvent : IDomainEvent
{
    public Guid EventId { get; }
    public Guid UserId { get; }
    public string Username { get; } = null!;
    public string? Nickname { get; }
    public Guid? DepartmentId { get; }
    public DateTime OccurredOn { get; }
    public UserCreatedEvent(Guid userId, string username, string? nickname = null, Guid? departmentId = null)
    {
        EventId = Guid.NewGuid();
        UserId = userId;
        Username = username;
        Nickname = nickname;
        DepartmentId = departmentId;
        OccurredOn = DateTime.UtcNow;
    }
}